package zerous.infinite;

import com.badlogic.gdx.*;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.graphics.g2d.*;
import zerous.infinite.screen.*;
import com.badlogic.gdx.graphics.g2d.freetype.*;

public class Infinite extends Game {
	
	GameScreen gameScreen;
	@Override
	public void create() {
		Info.PIXEL_SIZE = Gdx.graphics.getWidth()/256;
		Info.FONT_SIZE = (int)(Info.PIXEL_SIZE * 16);
		loadAssets();
		gameScreen = new GameScreen();
		setScreen(gameScreen);
	}

	@Override
	public void resume() {
		// TODO: Implement this method
		super.resume();
	}
	
	private void loadAssets() {
		FreeTypeFontGenerator gen = new FreeTypeFontGenerator(Gdx.files.internal("font.ttf"));
		Assets.fnt = gen.generateFont(Info.FONT_SIZE, Info.DEFAULT_CHAR, false);
		Assets.fnt.setColor(Color.BLACK);
		Assets.TEST = new Texture("test.png");
		Assets.PLAYER_FACE = new TextureRegion(new Texture("player_face.png"));
		Assets.PLAYER_BACK = new TextureRegion(new Texture("player_back.png"));
		Assets.PLAYER_RIGHT = new TextureRegion(new Texture("player_horizontal.png"));
		Assets.PLAYER_LEFT = new TextureRegion(new Texture("player_left.png"));
		Assets.TILE = new TextureRegion(new Texture("tile.png"));
		Assets.BLOCK = new TextureRegion(new Texture("block.png"));
		Assets.ROCKER = new Texture("rocker.png");
		Assets.ROCKER_LIMIT = new Texture("rocker_limit.png");
	}
}
